import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '@/components/model/home.vue'
import sort from '@/components/model/sort.vue'
import car from '@/components/model/car.vue'
import my from '@/components/model/my.vue'
import zhongchou from "@/components/qita/zhongchou.vue"
import jingxuan from "@/components/qita/jingxuan.vue"
import tuijian from "@/components/qita/tuijian.vue"
import shang from "@/components/qita/goods.vue"
import deng from "@/components/denglu/denglu.vue"
import zhuce from "@/components/denglu/zhuce.vue"
import zhanshi from "@/components/qita/zhanshi.vue"

import youpin from "@/components/sort/youpin.vue"
import shouji from "@/components/sort/shouji.vue"
import xiaomitv from "@/components/sort/sorter/xiaomitv.vue"

Vue.use(VueRouter)

const routes = [


  {
    path: '/home',
    name: 'home',
    component: home,
  },

  {
    path: '/sort',
    name: 'sort',
    component: sort,
  },
  {
    path: '/car',
    name: 'car',
    component: car
  },
  {
    path: '/my',
    name: 'my',
    component: my
  },
  {
    path:"/zhongchou",
    name:"zhongchou",
    component:zhongchou
  },
  {
    path:"/jingxuan",
    name:"jingxuan",
    component:jingxuan
  },
  {
    path:"/tuijian",
    name:"tuijian",
    component:tuijian,
    children:[
      {
        path:"/shang",
        name:"shang",
        component:shang
      },
    ]
  },
  
  {
    path: '/youpin', 
    name: 'youpin',
    component: youpin
  },
  {
    path: '/shouji', 
    name: 'shouji',
    component: shouji
  },
  {
    path: '/xiaomitv', 
    name: 'xiaomitv',
    component: xiaomitv
  },
  {
    path: '/deng', 
    name: 'deng',
    component: deng
  },
  {
    path: '/zhuce', 
    name: 'zhuce',
    component: zhuce
  },
  {
    path: '/zhanshi', 
    name: 'zhanshi',
    component: zhanshi
  },
  {
    path:"/",
    redirect:"Home"
  }
]

const router = new VueRouter({
  linkActiveClass:"active",
  base: process.env.BASE_URL,
  routes
})

export default router
